package pro.cherish.mqstream.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import pro.cherish.mqstream.consumer.OrdersSink;

/**
 * 消息监听消费
 */
@EnableBinding(OrdersSink.class)
@Slf4j
public class OrdersConsumer {

    @StreamListener(OrdersSink.ORDERS_INPUT)
    public void onReceive(String msg) {
        log.info(msg);
    }
}
